/*
 *  Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 *  This source code is licensed under the MIT license found in the LICENSE
 *  file in the root directory of this source tree.
 *
 */

/*
 *  THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN
 *  VAIN.
 *
 *  @generated
 */
#include "mcrouter/lib/network/test/gen/CarbonTestMessages.h"

#include "mcrouter/lib/network/test/gen/gen-cpp2/CarbonTest_types.h"

namespace facebook {
namespace memcache {
namespace test {
namespace thrift {

void ManyFields::deserialize(carbon::CarbonProtocolReader& reader) {
  reader.readStructBegin();
  while (true) {
    const auto pr = reader.readFieldHeader();
    const auto fieldType = pr.first;
    const auto fieldId = pr.second;

    if (fieldType == carbon::FieldType::Stop) {
      break;
    }

    switch (fieldId) {
      case 1: {
        reader.readField(buf1_ref(), fieldType);
        break;
      }
      case 2: {
        reader.readField(buf2_ref(), fieldType);
        break;
      }
      case 3: {
        reader.readField(buf3_ref(), fieldType);
        break;
      }
      case 4: {
        reader.readField(buf4_ref(), fieldType);
        break;
      }
      case 5: {
        reader.readField(buf5_ref(), fieldType);
        break;
      }
      case 6: {
        reader.readField(buf6_ref(), fieldType);
        break;
      }
      case 7: {
        reader.readField(buf7_ref(), fieldType);
        break;
      }
      case 8: {
        reader.readField(buf8_ref(), fieldType);
        break;
      }
      case 9: {
        reader.readField(buf9_ref(), fieldType);
        break;
      }
      case 10: {
        reader.readField(buf10_ref(), fieldType);
        break;
      }
      case 11: {
        reader.readField(buf11_ref(), fieldType);
        break;
      }
      case 12: {
        reader.readField(buf12_ref(), fieldType);
        break;
      }
      case 13: {
        reader.readField(buf13_ref(), fieldType);
        break;
      }
      case 14: {
        reader.readField(buf14_ref(), fieldType);
        break;
      }
      case 15: {
        reader.readField(buf15_ref(), fieldType);
        break;
      }
      case 16: {
        reader.readField(buf16_ref(), fieldType);
        break;
      }
      case 17: {
        reader.readField(buf17_ref(), fieldType);
        break;
      }
      case 18: {
        reader.readField(buf18_ref(), fieldType);
        break;
      }
      case 19: {
        reader.readField(buf19_ref(), fieldType);
        break;
      }
      case 20: {
        reader.readField(buf20_ref(), fieldType);
        break;
      }
      case 21: {
        reader.readField(buf21_ref(), fieldType);
        break;
      }
      case 22: {
        reader.readField(buf22_ref(), fieldType);
        break;
      }
      case 23: {
        reader.readField(buf23_ref(), fieldType);
        break;
      }
      case 24: {
        reader.readField(buf24_ref(), fieldType);
        break;
      }
      case 25: {
        reader.readField(buf25_ref(), fieldType);
        break;
      }
      case 26: {
        reader.readField(buf26_ref(), fieldType);
        break;
      }
      case 27: {
        reader.readField(buf27_ref(), fieldType);
        break;
      }
      case 28: {
        reader.readField(buf28_ref(), fieldType);
        break;
      }
      case 29: {
        reader.readField(buf29_ref(), fieldType);
        break;
      }
      case 30: {
        reader.readField(buf30_ref(), fieldType);
        break;
      }
      case 31: {
        reader.readField(buf31_ref(), fieldType);
        break;
      }
      case 32: {
        reader.readField(buf32_ref(), fieldType);
        break;
      }
      case 33: {
        reader.readField(buf33_ref(), fieldType);
        break;
      }
      case 34: {
        reader.readField(buf34_ref(), fieldType);
        break;
      }
      case 35: {
        reader.readField(buf35_ref(), fieldType);
        break;
      }
      case 36: {
        reader.readField(buf36_ref(), fieldType);
        break;
      }
      case 37: {
        reader.readField(buf37_ref(), fieldType);
        break;
      }
      case 38: {
        reader.readField(buf38_ref(), fieldType);
        break;
      }
      case 39: {
        reader.readField(buf39_ref(), fieldType);
        break;
      }
      case 40: {
        reader.readField(buf40_ref(), fieldType);
        break;
      }
      default: {
        reader.skip(fieldType);
        break;
      }
    }
  }
  reader.readStructEnd();
}

void McExpTestRequest::deserialize(carbon::CarbonProtocolReader& reader) {
  reader.readStructBegin();
  while (true) {
    const auto pr = reader.readFieldHeader();
    const auto fieldType = pr.first;
    const auto fieldId = pr.second;

    if (fieldType == carbon::FieldType::Stop) {
      break;
    }

    switch (fieldId) {
      case 1: {
        reader.readField(key_ref(), fieldType);
        break;
      }
      case 2: {
        reader.readField(flags_ref(), fieldType);
        break;
      }
      case 3: {
        reader.readField(deadlineMs_ref(), fieldType);
        break;
      }
      default: {
        reader.skip(fieldType);
        break;
      }
    }
  }
  reader.readStructEnd();
}
} // namespace thrift
} // namespace test
} // namespace memcache
} // namespace facebook
